<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored ="false" %> 
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  
  <body><center><form action="${ur==null?'user/sumbit':'user/update' }" method="post">
  <input type="hidden" name="user.id" value="${ur.id }"/>
    <table>
    	<tr><td>姓名</td></tr>
    	<tr><td><input type="text" name="user.name" size="21" value="${ur.name }"/></td></tr>
    	<tr><td>年龄</td></tr>
    	<tr><td><input type="text" name="user.age" size="21" value="${ur.age }"/></td></tr>
    	<tr><td>性别
    	<label><input name="user.sex" type="radio" value="1" <c:if test="${ur!=null&&ur.sex==1}">checked="checked"</c:if>  />男人 </label> 
    	<label><input name="user.sex" type="radio" value="2" <c:if test="${ur!=null&&ur.sex==2}">checked="checked"</c:if>  />女人</label> </td>
        </tr>
    	<tr><td>备注</td></tr>
    	<tr><td><textarea name="user.remark" style="overflow-y:scroll">${ur.remark }</textarea></td></tr>
    	<tr><td><input type="submit" value="提交"/></td></tr>
    	
    </table></form></center>
  </body>
</html>
